﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp1
{
   public class Class1
    {

     private static readonly   string str = "server=.;database=company;uid=sa;pwd=398611;";

        public static DataTable GetDataTable(string aaa)
        {
           
            SqlConnection connection = new SqlConnection(str);

            
            SqlDataAdapter adapter = new SqlDataAdapter(aaa, connection);

            connection.Open();

            DataTable dt = new DataTable();

            adapter.Fill(dt);

            return dt;
        }

        

       public static int Addupdate(string aaa)
        {
            SqlConnection connection = new SqlConnection(str);

            SqlCommand command = new SqlCommand(aaa, connection);

            connection.Open();

            return command.ExecuteNonQuery();
        }

        internal static object aud(string sql)
        {
            throw new NotImplementedException();
        }
    }
}
